	org 0x0
start:
	; ADD A,Rn 
	MOV R0, #0x3
	MOV A, #0x74
	ADD A, R0
	MOV 0x40, A

	; ADDC A,Rn 
	MOV PSW, #0x80
	MOV R0, #0x3
	MOV A, #0x74
	ADDC A, R0
	MOV 0x41, A
	
	; ADD A,direct
	MOV 0x20, #0x34
	MOV A, #0x74
	ADD A, 0x20
	MOV 0x42, A
	
	; ADDC A,direct
	MOV PSW, #0x80
	MOV 0x20, #0x34
	MOV A, #0x74
	ADDC A, 0x20
	MOV 0x43, A

	; ADD A,#data 
	MOV A, #0x56
	ADD A, #0x38
	MOV 0x44, A
	
	; ADDC A,#data 
	MOV PSW, #0x80
	MOV A, #0x56
	ADDC A, #0x38
	MOV 0x45, A
	
	; ADD A,@Ri
	MOV 0x20, #0x34
	MOV R1, #0x20
	MOV A, #0x37
	ADD A, @R1
	MOV 0x46, A
	
	; ADDC A,@Ri
	MOV PSW, #0x80
	MOV 0x20, #0x34
	MOV R1, #0x20
	MOV A, #0x37
	ADDC A, @R1
	MOV 0x47, A
	
	; ADDC A,@Ri
	MOV PSW, #0x00
	MOV 0x20, #0x34
	MOV R1, #0x20
	MOV A, #0x37
	ADDC A, @R1
	MOV 0x48, A
		
	
	sjmp $
	
; for test
REG_SP		EQU	0x1000
REG_A		EQU	0x1001
REG_B		EQU	0x1002
REG_PSW		EQU	0x1003
REG_PC		EQU	0x1004
REG_DPTR	EQU	0x1005
CYCLE		EQU 0x1006
REG_R0		EQU	0x2000
REG_R1		EQU	0x2001
REG_R2		EQU	0x2002
REG_R3		EQU	0x2003
REG_R4		EQU	0x2004
REG_R5		EQU	0x2005
REG_R6		EQU	0x2006
REG_R7		EQU	0x2007
REG_END		EQU	0x2FFF
	org 0x600
	dW  REG_SP,		0x7
	dW  REG_A,		0x6b
	dW  REG_B,		0x0
	dW  REG_PSW,	0x1
	dW  REG_PC,		0x59
	dw  REG_DPTR,	0x00
	dw 	CYCLE,		54

	dw  REG_R0,		0x03
	dw  REG_R1,		0x20

	dw  0x40,		0x77
	dw  0x41,		0x78
	dw  0x42,		0xA8
	dw  0x43,		0xA9
	dw  0x44,		0x8E
	dw  0x45,		0x8F
	dw  0x46,		0x6B
	dw  0x47,		0x6C
	dw  0x48,		0x6B

	dw  REG_END,	0
	end		